<%@ include file="connect.jsp" %>

<%
    String pert = request.getParameter("question");
    String pilA = request.getParameter("pilA");
    String pilB = request.getParameter("pilB");
    String pilC = request.getParameter("pilC");
    String pilD = request.getParameter("pilD");
    String Ans = request.getParameter("answer");
    String id = request.getParameter("gamesID");
    String ganti = pert.replaceAll("'", "''");

    stat.executeUpdate("INSERT INTO DetailGames (Answer, gamesID, Option_1, Option_2, Option_3, Option_4, Question, stylesID) " +
            "values ('" + Ans + "', '" + id + "' , '" + pilA + "','" + pilB + "','" + pilC + "','" + pilD + "','" + ganti + "',1) ");


    response.sendRedirect("games.jsp?respon=Successfully added question!");

    conn.close();


%>
